//
//  ZPBSecondCollectionViewCell.m
//  WZLProduct
//
//  Created by boys on 16/3/19.
//  Copyright © 2016年 HaiTeng. All rights reserved.
//

#import "ZPBSecondCollectionViewCell.h"

@implementation ZPBSecondCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self creatimage];
        

       
 
        
    }return self;
}


- (void)creatimage {
   self.img = [[UIImageView alloc] init];
    [self.contentView addSubview:_img];
    self.label = [[UILabel alloc] init];
    [self.contentView addSubview:_label];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    [_img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(20);
        make.centerX.mas_equalTo(self.contentView.mas_centerX);
        make.left.mas_equalTo(20);
        make.right.mas_equalTo(-20);
        make.height.mas_equalTo(35);
        
    }];
    
    _img.backgroundColor = [UIColor redColor];
    
    [_label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(55);
        make.centerX.equalTo(self.contentView.mas_centerX);
        make.left.equalTo(_img);
        make.right.mas_equalTo(-20);
        make.height.mas_equalTo(15);
        
    }];
    _label.backgroundColor = [UIColor yellowColor];
}





@end
